/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package javaapplication1;

import java.awt.image.BufferedImage;
import java.io.IOException;
import java.net.URL;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.imageio.ImageIO;

/**
 *
 * @author Admin
 */
public class LoadHinh extends Thread {
    private String urlImg;
    private BufferedImage imgBuff;

    public BufferedImage getImgBuff() {
        return imgBuff;
    }
    public LoadHinh(String urlImg) {
        this.urlImg = urlImg;
    }
    @Override
    public void run()
    {
        try {
            imgBuff= ImageIO.read(new URL(this.urlImg));
        } catch (IOException ex) {
            Logger.getLogger(LoadHinh.class.getName()).log(Level.SEVERE, null, ex);
        }
        
    }
    
    
}
